package cn.itcast.bassm.util;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.params.CoreConnectionPNames;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

import cn.itcast.bassm.mapper.PushMapper;
import cn.itcast.bassm.mapper.UserMapper;
import cn.itcast.bassm.service.InputandUpdowService;
import cn.itcast.bassm.service.QQMailService;
import cn.itcast.bassm.service.TestInterfaceService;

@Component
public class TaskCool {
	@Autowired
	private InputandUpdowService inputandUpdowService;
	@Autowired
	private QQMailService qQMailService;
	@Autowired
	private  PushMapper pushMapper;
	@Autowired
	private UserMapper userMapper;
	@Autowired
	private TestInterfaceService testInterfaceService;
	
	public void testJob() throws Throwable{
		try {
		//快速绑定的用户如果7天还没有进行绑定，将删除用户信息，让用户重新注册
		//String yindate="0";

		Date data=new Date();

        SimpleDateFormat dateFormat=new SimpleDateFormat("yyyyMMdd");

        String idnumber = dateFormat.format(data);

        //SimpleDateFormat dateFormat2=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
        //String updatetime = dateFormat2.format(data);
        //userMapper.updatevistorsendtime(yupdatetime,state);
        
        userMapper.deleteandusertoidnumber(idnumber);
        
        

	} catch (Exception e) {	

		e.printStackTrace();

	}
		

	} 
}



